Getting started
Fantomas has a fairly straightforward setup.
Recommended workflow
We recommend the following overall workflow when developing for this repository:
- Fork this repository
- Always work in your fork
- Always keep your fork up to date
Before updating your fork, run this command:
|
This will make management of multiple forks and your own work easier over time.
Updating your fork
We recommend the following commands to update your fork:
|
Or more succinctly:
|
This will update your fork with the latest from fsprojects/fantomas
on your machine and push those updates to your remote fork.
dotnet SDK
Please download the correct dotnet SDK, according to our global.json
file.
Initial build
After cloning the repository, you should restore the local dotnet tools and the solution:
|
The restore of project Fantomas.FCS
(via the solution restore) will download the F# compiler source code.
Afterwards, you can run the default build script. This will build the solution, run all unit tests and do everything that the CI build does.
|
Alternately, you can also run some other pipelines using -p
.
Examples:
dotnet fsi build.fsx -p FormatChanged
will format all modified files detected bygit
.dotnet fsi build.fsx -p Docs
will serve the documentation website locally.-
dotnet fsi build.fsx -p EnsureRepoConfig
sets up some git repo-level configuration to ensure that formatting of new code is consistent before it is pushed up to a remote repository.